package com.example.heimaai.entity.VO;

import lombok.Data;
import org.springframework.ai.chat.messages.Message;
import org.springframework.ai.chat.messages.MessageType;

@Data
public class MessageVO {
    private String role;
    private String content;
    public MessageVO(Message message){
        MessageType messageType = message.getMessageType();
        switch (messageType){
            case USER:
                role="user";
                break;
            case ASSISTANT:
                role="assistant";
                break;
            default:
                role="";
        }
        content=message.getText();
    }
}
